import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86183
 * Date: 2024-02-28
 * Time: 16:41
 */
public class Test {
    public static void main(String[] args) {
        Map<String,Integer> map=new TreeMap<>();
        map.put("abc",2);
        map.put("poll",4);
        map.put("hello",10);
        System.out.println(map.put("abc", 100));
       /* Map<String,Integer> map=new HashMap<>();
        map.put("abc",2);
        map.put("poll",4);
        map.put("hello",10);
        map.put(null,null);*/
        Set<Map.Entry<String,Integer>> set2=map.entrySet();
        for (Map.Entry<String,Integer> entry:set2) {
            System.out.println("key: "+entry.getKey()+"   val: " +entry.getValue());
        }
        System.out.println(map.containsValue(100));
    }
}
